package project.controllers;

import java.util.GregorianCalendar;

public class Controller {

	private static GregorianCalendar d;
	private static Integer i;
	private static String s;
	private DateFormatter df = new DateFormatter();
	private ConsoleScanner cs;
	public static Controller CONTROLLER;
	
	private Controller(){
		cs=ConsoleScanner.getInstance();
		
	}
	
	public static  Controller getInstance(){
		if(CONTROLLER == null){
			CONTROLLER = new Controller();
		}
		return CONTROLLER;
	}

	public GregorianCalendar getDate() {
		Printer.printMessage(Messager.DATE);
		d = df.formatDate();
		return d;
	}

	public GregorianCalendar getBeginDate() {
		Printer.printMessage(Messager.BEGIN_DATE);
		d = df.formatDate();
		return d;
	}

	public GregorianCalendar getEndDate() {
		Printer.printMessage(Messager.END_DATE);
		d = df.formatDate();
		return d;
	}

	public GregorianCalendar getBeginingDate() {
		Printer.printMessage(Messager.BEGINING_DATE);
		d = df.formatDate();
		return d;
	}

	public GregorianCalendar getFillingDate() {
		Printer.printMessage(Messager.FILLING_DATE);
		d = df.formatDate();
		return d;
	}

	public GregorianCalendar getDeadlineDate() {
		Printer.printMessage(Messager.DEADLINE_DATE);
		d = df.formatDate();
		return d;
	}

	public Integer getPrice() {
		Printer.printMessage(Messager.PRICE);
		i = cs.getIntData();
		return i;
	}

	public Integer getNumberGarage() {
		Printer.printMessage(Messager.GARAGE_NUMBER);
		i = cs.getIntData();

		return i;
	}

	public Integer getNumberOrder() {
		Printer.printMessage(Messager.ORDER_NUMBER);
		i = cs.getIntData();
		return i;
	}

	public String getMasterName() {
		Printer.printMessage(Messager.MASTER_NAME);
		s = df.getString();
		return s;
	}
}
